
export default {

  namespace: 'employeeAcount',

  state: {
    modalStatus: false,
    isBan: false,
    remarkBtn: true,
    visible: false,
    staff: {},
    dataPermission: false,
    dataModalStatus: false,
    staffType: 'indoorwork',
    value: undefined
  },

  subscriptions: {
    setup({ dispatch, history }) {  // eslint-disable-line
    }
  },

  effects: {
    * change ({ payload: status }, { call, put }) {
      yield put({ type: 'save', payload: { modalStatus: status } })
    },
    * isBan ({ payload: status }, { call, put }) {
      yield put({ type: 'save', payload: { isBan: status } })
    },
    * remarkBtnShow ({ payload: status }, { call, put }) {
      yield put({ type: 'save', payload: { remarkBtn: status } })
    },
    * staffType ({ payload: value }, { put }) {
      yield put({ type: 'save', payload: { staffType: value } })
    }
  },

  reducers: {
    save (state, action) {
      return { ...state, ...action.payload }
    }
  }

}
